<template>
  <div class="boxTreatment">
    <el-card class="box-card">
      <div slot="header" class="clearfix">
        <span style="line-height: 36px;">品项数分析</span>
      </div>
      <div  class="box-button">
        <el-button @click="dialogOpen">分析明细</el-button>
      </div>
    </el-card>
    <s-dialog :dialog="dialog">
      <el-collapse value="1">
        <!--name="1":设置collapse默认打开-->
        <el-collapse-item title="品项数分析" name="1">
          <s-form :form="formDialog" ref="formDialog">
            <el-form-item prop="xbh" label="箱编号">
              <el-input
                type="text"
                ref="xbhjd"
                style="width:60%"
                @change="xbhchange"
                v-model="xbhinput"
                placeholder="箱编号"></el-input>
            </el-form-item>
          </s-form>
          <s-table :table="table" ref="table" @http="tableWatch" :expand="false" :pagination="false" :control="false">
          </s-table>
        </el-collapse-item>
      </el-collapse>
    </s-dialog>
  </div>
</template>

<script>
  import {AutoVue, GetLodop} from '~/plugins/Tools';

  function __form () {
    return {
      mc: { value: '', rule: [ 'vNull' ], search: true },
      bz: { value: '', rule: [], search: false },
      dm: { value: '', rule: [ 'vNull' ], cRemarks: '' },
      // xbh: { value: '', rule: [ 'vNull' ], cRemarks: '' },
    };
  }
  export default AutoVue({
    name: 'outOperation_boxTreatment-FEcarWms',
    head: {
      'title': '品项数分析',
      'meta': [
        { 'hid': 'description', 'name': 'description', 'content': '乐速科技平台 品项数分析 查看品项数分析信息' },
      ],
    },
    store: [''],
    data: {
      options: [],
      table: {
        column: [
        ],
        url: '/wmsSetBox/getXmx',
        key: 'id',
        tableColumn: 0,
        muti: false,
      },
      formDialog: __form(),
      dialog: {
        title: '品项数分析',
        row: {},
      },
      xbhinput: '',
      xbhinput_hx: '',
      xzlx: '',
      lxr: '',
      address: '',
      weight: '0.00',
      xxselect: '',
      xxselect_hx: '',
      xidarr: [],
      xbhid: '',
      hxid: '',
      objcheck: {},
    },
    transition: 'slide-fade',
    methods: {
      dialogOpen () {
        this.dialog.visible = true;
        //  获取input聚焦(光标聚焦)
        setTimeout(() => {
          this.$refs.xbhjd.$el.children[0].focus();
        }, 500);
      },
      xbhchange () {
      },
    },
    mounted: function () {
      console.log(this);
      // this.table.tableColumn = [];
      // this.table.tableColumnAll = [];
      // this.tableWatch('table');
    },
  });
</script>
<style scoped lang="scss">
  .box-button {
    text-align:center;
    width:100%;
    height:100%;
    margin:0px;
  }
  .button {
    margin-left: 10px;
  }
  .box-card {
    margin: 20px;
  }

  .createTimeSpan {
    display: block;
    margin-top: 34px;
  }

  @media screen and (max-width: 800px) {
    .createTimeSpan {
      margin-top: 0;
    }
    .box-card {
      margin: 0;
    }
  }

  .el-select {
    width: 100%;
  }
</style>

<style lang="scss">
  .boxTreatment{
    width: 88vw;
    float: left;
  }
</style>
